﻿<d:OptionDialog x:Class="ClearMine.Framework.Dialogs.ExceptionBox" x:ClassModifier="internal"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:d="clr-namespace:ClearMine.Framework.Dialogs"
                x:Name="root" MaxWidth="640" MaxHeight="480"
                WindowStartupLocation="CenterOwner"
                ExpanderMessage="{DynamicResource ExceptionBoxExpanderLabel}"
                Title="{DynamicResource ExceptionBoxTitle}">
    <d:OptionDialog.Options>
        <x:Array Type="{x:Type Button}">
            <Button Margin="0,0,7,0"
                    Click="OnReportButtonClick"
                    Content="{DynamicResource SendExceptionReportLabel}"/>
            <Button Margin="0,0,7,0"
                    IsDefault="True"
                    ToolTip="{DynamicResource IgnoreExceptionButtonToolTip}"
                    Content="{DynamicResource IgnoreExceptionButtonLabel}"
                    Click="OnIgnoreClick" />
            <Button IsCancel="True"
                    Content="{DynamicResource ShutdownButtonLabel}"
                    Click="OnShutdownClick" />
        </x:Array>
    </d:OptionDialog.Options>
    <DockPanel>
        <TextBlock DockPanel.Dock="Bottom"
                   Margin="0,12,12,12"
                   TextAlignment="Right"
                   Visibility="{Binding HasInnerException, ElementName=root, Converter={StaticResource BooleanToVisibilityConverter}}">
            <Hyperlink Click="OnShowInnerException">Show inner exception</Hyperlink>
        </TextBlock>
        <TextBox Text="{Binding StackTrace, ElementName=root, Mode=OneWay}"
                 ScrollViewer.HorizontalScrollBarVisibility="Auto"
                 ScrollViewer.VerticalScrollBarVisibility="Auto"
                 BorderThickness="0"
                 IsReadOnly="True" />
    </DockPanel>
</d:OptionDialog>
